d6c6d9
@@ -191,8 +191,7 @@
public boolean isKey(ImmutableBitSet columns) {
             break;
           }
         }
-        if (pkPos == rowType.getFieldNames().size()
-            || pkPos == rowType.getFieldNames().size()) {
+        if (pkPos == rowType.getFieldNames().size()) {
           LOG.error("Column for primary key definition " + pkColName + " not found");
           return ImmutableList.of();
         }
@@ -218,8 +217,7 @@
public boolean isKey(ImmutableBitSet columns) {
             break;
           }
         }
-        if (ukPos == rowType.getFieldNames().size()
-            || ukPos == rowType.getFieldNames().size()) {
+        if (ukPos == rowType.getFieldNames().size()) {
           LOG.error("Column for unique constraint definition " + ukCol.colName + " not found");
           return ImmutableList.of();
         }
